package IC.Semantics.symbols;

import IC.Semantics.types.SemanticType;

/**
 * describes a symbol - the base entry of a symbol table.
 * called semantic symbol to make a more coherent difference from the Parser Symbol Type 
 */
public abstract class SemanticSymbol 
{
	protected final String name;
	protected final int line;
	protected final SemanticType type;
	protected final SemanticKind kind;
	protected boolean forwardRef;

	
	public SemanticSymbol(String name, int line, SemanticType type, SemanticKind kind){
		this.name = name;
		this.line = line;
		this.type = type;
		this.kind = kind;
	}
	
	public SemanticSymbol(String name, int line, SemanticType type, SemanticKind kind, boolean forwardRef){
		this.name = name;
		this.line = line;
		this.type = type;
		this.kind = kind;
		this.forwardRef = forwardRef;
	}
	
	public String getName(){
		return name;
	}
	
	public SemanticType getType(){
		return type;
	}
	
	public boolean isForwardReferenced(){
		return forwardRef;
	}
	
	public void setForwardRef(boolean isRef){
		this.forwardRef = isRef;
	}
}
